#ifndef CONSTRAINT_HH_
# define CONSTRAINT_HH_

#include "variable.hh"
#include "bound.hh"

#include <vector>
#include <utility>

class constraint
{
public:
  constraint (const std::string name, const bound& bnd);
  void add_variable (const variable& var, double coeff);
  bound get_bound () const;
  double get_coeff(const variable& v) const;
  std::string get_name() const;
  friend std::ostream& operator<< (std::ostream&, const constraint& w);
protected:
  std::string name_;
  bound bound_;
  std::vector<std::pair<variable, double> > variables_;
};

#endif /* !CONSTRAINT_HH_ */
